1. Field of the Invention
The present invention is directed to an improvement in computing systems and in particular to computer systems which manage keys for encrypted data.
2. Description of the Related Art
As confidential and sensitive data is increasingly stored on computer systems, or transmitted over communications networks, including the Internet, it is of increasing importance to have methods and systems to ensure the security of such data. Typically, such data is encrypted as it is stored or transmitted by a computer system and then decrypted when the data is to be accessed after being retrieved or received. Many different approaches are known to those skilled in the art and are available to permit users to encrypt and then decrypt computer data.
To encrypt data, data encryption keys are required. A typical encryption system takes as input the source data to be encrypted and an encryption key. For the same source data, but different encryption keys, a typical encryption system will create different encrypted data. It is intended that only a person knowing the encryption key will be able to decrypt the encrypted data.
It is a poor security practice if one encrypts all data using a single data encryption key or a single set of data encryption keys. This is because by reusing the same key or set of keys, more data are available for analysis of encrypted data (cryptanalysis) for a third party to break the encryption system. Therefore, to ensure the security of a series or collection of encrypted data, for each piece of data (or each occasion) to be encrypted in the series or collection, different data encryption keys are used.
The data encryption keys for each occasion are called session keys because an occasion usually corresponds to a communication session if data are transmitted over a communication network. The term xe2x80x9csession keyxe2x80x9d is also applicable to occasions where no communication is involved but where data encryption is required. The more encrypted data or files one produces the more data encryption keystone has. Matching data encryption keys to the corresponding encrypted data becomes a key management problem if there are many instances of encrypted data and a correspondingly large number of data encryption keys.
Misplacing or losing data encryption keys, or mismatching the data encryption keys and encrypted data, result in the failure to decrypt the encrypted data. It is therefore important to be able to ensure that the correct data encryption keys are associated with the appropriate encrypted data. However, a method of associating the encryption keys with the encrypted data which is simple and easy to use for the party intended to retrieve the encrypted data will also be potentially simple and easy for unauthorized parties to use, to the detriment of the security of the encrypted data. This potential difficulty is present where the data encryption keys are stored or transmitted together with the encrypted data. Although such a simple system ensures that the encryption keys are available to the recipient or person intended to retrieve the data, others may also find the encryption keys and decrypt the encrypted message.
Security for such a system, where the encryption keys are included with the encrypted message, is not to store or transmit the encryption keys in an easily readable format but rather to encrypt the encryption keys themselves. This approach means that the data encryption keys will be encrypted by a key encryption key. This in turn leads to the problem how to transmit or store the key encryption key so that it remains secure.
In the prior art, a security infrastructure to solve the key management problems is often used. Such a security infrastructure may either involve a key distribution center for a symmetric encryption system or a certificate authority used in asymmetric encryption (public key encryption). A key distribution center generates symmetric key encryption keys and distributes them to users in a secure manner. For asymmetric encryption, a certificate authority issues a certificate to a user, which contains the user""s public key and is digitally signed by the certificate authority. A user can generate session keys to encrypt data, then using the receiver""s public encryption key the user will encrypt the session keys. The receiver can recover the session keys through decryption using the receiver""s private decryption key. Encrypted data can be decrypted using the recovered session keys.
Both key distribution centers and certificate authorities are known to those skilled in the art. Use of such security infrastructures is made in sophisticated computer systems where data security is required. However, for most users, such an infrastructure is unavailable, expensive to implement it, or inconvenient.
It is therefore desirable to have a computer system which is capable of encryption key management without requiring a security infrastructure such as a key distribution center or a certificate authority.
According to one aspect of the present invention, there is provided an improved system for managing keys for encrypted data.
According to another aspect of the present invention, there is provided a method for managing encryption keys for data comprising the steps of:
a) generating a session key;
b) encrypting the data using the session key, the encrypted data having a binary representation;
c) generating a key encryption key based on an initial vector, the initial vector being known only to a party encrypting the data and a party intended to decrypt the data;
d) encrypting the session key using the key encryption key, the encrypted session key having a binary representation;
e) generating a set of indices by a one-way transform mapping based on the length of the binary representation of the encrypted session key, the length of the binary representation of the encrypted data, and the initial vector; and
f) reformatting the binary representation of the encrypted data to generate an output set of binary data by interleaving the encrypted session key with the encrypted data by dividing the binary representation of the encrypted session key into segments and inserting the segments into the binary representation of the encrypted data at locations determined by the set of indices.
According to a further aspect of the present invention there is provided a method for the selective decryption of the data encrypted as described above, the decryption including the steps of:
a) regenerating the set of indices by using the one-way transform mapping based on the length of the binary representation of the encrypted session key, the length of the binary representation of the encrypted data, and the initial vector;
b) rebuilding the encrypted session key by using the regenerated set of indices to extract the segments of the binary representation of the encrypted session key from the output set of binary data and assembling the segments to form the encrypted session key;
c) rebuilding the encrypted data by using the regenerated set of indices to extract the binary representation of the encrypted data from the output set of binary data;
d) regenerating the key encryption key, using the initial vector;
e) regenerating the session key by decrypting the rebuilt encrypted session key using the regenerated key encryption key; and
f) decrypting the rebuilt encrypted data using the regenerated session key.
According to another aspect of the present invention, the above methods are implemented in which the number of elements in the set of indices is equal to the number of 8-bit bytes in the binary representation of the encrypted session key, in which each element of the set of indices is an index into the binary representation of the encrypted data, and in which each segment of the encrypted session key is one byte long, whereby the step of interleaving the encrypted session key with the encrypted data comprises the bytes of the binary representation of the encrypted session key being inserted at the byte-location in the binary representation of the encrypted data determined by the indices.
According to another aspect of the present invention, the above methods include the further step of padding the output set of data with data representing the length of the binary representation of the encrypted data and with data representing the length of the binary representation of the encrypted session key.
According to another aspect of the present invention, there is provided a method for managing encryption keys in a computer system environment having a client and a server, including the steps of:
a) authenticating communication between the client and the server;
b) securely communicating an initial vector to the client and the server;
c) defining a server application and a client application in the server, whereby the client application comprises computer code, for a set of data, for the following functions:
i) generating a session key;
ii) encrypting the set of data using the session key, the encrypted data having a binary representation;
iii) generating a key encryption key based on the initial vector;
iv) encrypting the session key using the key encryption key, the encrypted session key having a binary representation;
v) generating a set of indices by a one-way transform mapping based on the length of the binary representation of the encrypted session key, the length of the binary representation of the encrypted data, and the initial vector; and
vi) reformatting the binary representation of the encrypted data to generate an output set of binary data by interleaving the encrypted session key with the encrypted data by dividing the binary representation of the encrypted session key into segments and inserting the segments into the binary representation of the encrypted data at locations determined by the set of indices;
and whereby the client application comprises computer code for the following functions:
vii) regenerating the set of indices by using the one-way transform mapping based on the length of the binary representation of the encrypted session key, the length of the binary representation of the encrypted data, and the initial vector;
viii) rebuilding the encrypted session key by using the regenerated set of indices to extract the segments of the binary representation of the encrypted session key from the output set of binary data and assembling the segments to form the encrypted session key;
ix) rebuilding the encrypted data by using the regenerated set of indices to extract the binary representation of the encrypted data from the output set of binary data;
x) regenerating the key encryption key, using the initial vector;
xi) regenerating the session key by decrypting the rebuilt encrypted session key using the regenerated key encryption key; and
xii) decrypting the rebuilt encrypted data using the regenerated session key;
d) providing the client application to the client; and
e) communicating between the client and the server by sets of data which are encrypted by the functions of the client application and decrypted by the functions of the server application.
According to another aspect of the present invention, there is provided a method for managing encryption keys for a plurality of sets of data comprising the steps of:
a) initializing an initial vector; and
b) for each set of data:
i) generating an associated session key for the set of data using an encryption key generation algorithm whereby there is a low probability that more than two or more of the plurality of sets of data will share the same session key;
ii) encrypting the set of data using the associated session key, the encrypted set of data having a binary representation;
iii) generating a key encryption key for the associated session key, based on the initial vector;
iv) encrypting the associated session key using the key encryption key, the encrypted associated session key having a binary representation;
v) generating a set of indices for the set of data by a one-way transform mapping based on the length of the binary representation of the encrypted associated session key, the length of the binary representation of the encrypted set of data, and the initial vector; and
vi) reformatting the binary representation of the encrypted set of data to generate an output set of binary data by interleaving the encrypted associated session key with the encrypted set of data by dividing the binary representation of the encrypted associated session key into segments and inserting the segments into the binary representation of the encrypted set of data at locations determined by the set of indices.
According to another aspect of the present invention, in the above methods the step of initializing the initial vector includes the step of receiving a password from a user.
According to another aspect of the present invention, in the above methods the step of initializing the initial vector further comprises the step of a deriving the initial vector from a function which takes as its input the password, a timestamp, and a message digest which is a hashed value of a subset of the plurality of the encrypted sets of data.
According to another aspect of the present invention, there are provided program storage devices readable by a machine, tangibly embodying a program of instructions executable by the machine to perform the above methods.
According to another aspect of the present invention, there is provided a computer system for managing encryption keys for data comprising:
a) means for generating a session key;
b) means for encrypting the data using the session key, the encrypted data having a binary representation;
c) means for generating a key encryption key based on an initial vector, the initial vector being known only to a party encrypting the data and a party intended to decrypt the data;
d) means for encrypting the session key using the key encryption key, the encrypted session key having a binary representation;
e) means for generating a set of indices by a one-way transform mapping based on the length of the binary representation of the encrypted session key, the length of the binary representation of the encrypted data, and the initial vector; and
f) means for reformatting the binary representation of the encrypted data to generate an output set of binary data by interleaving the encrypted session key with the encrypted data by dividing the binary representation of the encrypted session key into segments and inserting the segments into the binary representation of the encrypted data at locations determined by the set of indices.
According to another aspect of the present invention, the above system further includes means for the selective decryption of the encrypted data having:
a) means for regenerating the set of indices by using the one-way transform mapping based on the length of the binary representation of the encrypted session key, the length of the binary representation of the encrypted data, and the initial vector;
b) means for rebuilding the encrypted session key by using the regenerated set of indices to extract the segments of the binary representation of the encrypted session key from the output set of binary data and assembling the segments to form the encrypted session key;
c) means for rebuilding the encrypted data by using the regenerated set of indices to extract the binary representation of the encrypted data from the output set of binary data;
d) means for regenerating the key encryption key, using the initial vector;
e) means for regenerating the session key by decrypting the rebuilt encrypted session key using the regenerated key encryption key; and
f) means for decrypting the rebuilt encrypted data using the regenerated session key.
According to another aspect of the present invention, there is provided a computer program product for managing encryption keys in a computer system environment having a client and a server, comprising a computer usable medium having computer readable code means embodied in said medium to perform steps including:
a) authenticating communication between the client and the server;
b) securely communicating an initial vector to the client and the server;
c) defining a server application and a client application in the server, whereby the client application comprises computer code, for a set of data, for the following functions:
i) generating a session key;
ii) encrypting the set of data using the session key, the encrypted data having a binary representation;
iii) generating a key encryption key based on the initial vector;
iv) encrypting the session key using the key encryption key, the encrypted session key having a binary representation;
v) generating a set of indices by a one-way transform mapping based on the length of the binary representation of the encrypted session key, the length of the binary representation of the encrypted data, and the initial vector; and
vi) reformatting the binary representation of the encrypted data to generate an output set of binary data by interleaving the encrypted session key with the encrypted data by dividing the binary representation of the encrypted session key into segments and inserting the segments into the binary representation of the encrypted data at locations determined by the set of indices;
and whereby the client application comprises computer code for the following functions:
vii) regenerating the set of indices by using the one-way transform mapping based on the length of the binary representation of the encrypted session key, the length of the binary representation of the encrypted data, and the initial vector;
viii) rebuilding the encrypted session key by using the regenerated set of indices to extract the segments of the binary representation of the encrypted session key from the output set of binary data and assembling the segments to form the encrypted session key;
ix) rebuilding the encrypted data by using the regenerated set of indices to extract the binary representation of the encrypted data from the output set of binary data;
x) regenerating the key encryption key, using the initial vector;
xi) regenerating the session key by decrypting the rebuilt encrypted session key using the regenerated key encryption key; and
xii) decrypting the rebuilt encrypted data using the regenerated session key;
d) providing the client application to the client; and
e) communicating between the client and the server by sets of data which are encrypted by the functions of the client application and decrypted by the functions of the server application.
Advantages of the present invention include having segments of the encrypted session key stored with the encrypted data, such that the encrypted session key cannot be lost or disassociated from the encrypted data.